Fixed getColumns function to return correct output for complex datatypes#974
Merged
Conversation
… TYPE_NAME,BUFFER_LENGTH. Used StripBaseTypeName instead of StripTypeName to fix the incorrect values in case of complex datatypes
shivam2680
reviewed
Sep 1, 2025
| .columnType(columnType) | ||
| .columnTypeText( | ||
| metadataResultSetBuilder.stripTypeName( | ||
| metadataResultSetBuilder.stripBaseTypeName( |
Collaborator
There was a problem hiding this comment.
what is changing stripTypeName to stripBaseTypeName fixing exactly?
Collaborator
There was a problem hiding this comment.
we don't need to change for thrift resultsetmetadata?
Collaborator
Author
There was a problem hiding this comment.
So now instead of returning array<INT> it'll simply return the base type that is array.
For thrift, it uses another method but the behaviour is same for that as well.
…ComplexDatatypeSuppor is 0. Added tests for the same
shivam2680
reviewed
Sep 3, 2025
shivam2680
reviewed
Sep 3, 2025
| if (typeVal != null | ||
| && (typeVal.contains(DATE_TYPE) || typeVal.contains(TIMESTAMP_TYPE))) { | ||
| object = getCode(stripTypeName(typeVal)); | ||
| && (stripBaseTypeName(typeVal).contains(DATE_TYPE) |
shivam2680
reviewed
Sep 3, 2025
shivam2680
reviewed
Sep 3, 2025
Merged the latest changes from main
gopalldb
reviewed
Sep 8, 2025
| * @param typeVal The type string to check | ||
| * @return true if the type is a complex type, false otherwise | ||
| */ | ||
| private boolean isComplexType(String typeVal) { |
Collaborator
Author
There was a problem hiding this comment.
Since variant is not a complex type so we do not need to handle it differently
gopalldb
reviewed
Sep 8, 2025
gopalldb
reviewed
Sep 8, 2025
gopalldb
approved these changes
Sep 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixed getColumns function: SQL_DATATYPE, SQL_DATETIME_SUB, DATA_TYPE, TYPE_NAME,BUFFER_LENGTH. Used StripBaseTypeName instead of StripTypeName to fix the incorrect values in case of complex datatypes.
Testing
Tested manually
RELATED TICKETS AND DOCUMENTS
PECOBLR-838
Fixes #955